import numpy as np
arr=np.arange(0,4)
print(arr)

arr2=np.arange(1,10,2)
print(arr2)
arr3=np.arange(0, 1, 0.2)
print(arr3)
arr4=np.arange(5,0,-1)
print(arr4)

linspace函数
import numpy as np
arr5=np.linspace(5,12,num=5,endpoint=true,retstep=true)
print(arr5)

arr6=np.logspace(2,8,num=5,endpoint=false,base=2)
print(arr6)